"use strict";

/** @type {import('sequelize-cli').Migration} */
module.exports = {
  async up(queryInterface, Sequelize) {
    const { INTEGER, BOOLEAN, STRING, DATE } = Sequelize;
    await queryInterface.createTable("teleplay", {
      id: { type: INTEGER, primaryKey: true, autoIncrement: true },
      name: STRING(100),
      classify: STRING(100),
      actors: STRING(300),
      pic: STRING(100),
      desc: STRING(500),
      word: STRING(40),
      score: STRING(6),
      directors: STRING(300),
      show: { type: BOOLEAN, defaultValue: true },
      created_at: DATE,
      updated_at: DATE,
    });
  },

  async down(queryInterface, Sequelize) {
    await queryInterface.dropTable("teleplay");
  },
};
